import { ResPage, DeviceKind, ResultData } from "@/api/interface/index";
import http from "@/api";

/**
 * @name 设备分类管理模块
 */
// 获取设备分类列表
export const getDeviceKindList = (params: DeviceKind.ReqDeviceKindParams) => {
  return http.post<ResPage<DeviceKind.ResDeviceKindList>>(`/device/kind/query`, params);
};
// 获取设备分类详情
export const getDeviceKindDtl = (params: { kindId: number }) => {
  return http.post<ResultData>(`/device/kind/detail`, params);
};
// 新增设备分类
export const addDeviceKind = (params = {}) => {
  return http.post(`/device/kind/add`, params);
};
// 编辑设备分类
export const editDeviceKind = (params: { kindId: string }) => {
  return http.post(`/device/kind/modify`, params);
};

// 删除设备分类
export const deleteDeviceKind = (params: { kindList: { kindId: string }[] }) => {
  return http.post(`/device/kind/remove`, params);
};

// 获取设备分类选择列表
export const getDeviceKindSelList = (params = {}) => {
  return http.post(`/device/kind/selectionList`, params);
};
